clear all
use "Data\W5 (Finaldata Post-Imputation).dta"

*****Table 3 Regression Results of Outcome and Baseline Models****
logit Understanding_of_Democracy Family_Values Social_Values Political_Values Country_Economic_Evaluation Family_Economic_Evaluation Social_Capital Political_Interest Political_Efficiency Election_Participation Internet_Use gender age education residence employment family_status household_income i.country i.Year, robust
est store m1

reg Democratic_Priority Understanding_of_Democracy Family_Values Social_Values Political_Values Country_Economic_Evaluation Family_Economic_Evaluation Social_Capital Political_Interest Political_Efficiency Election_Participation Internet_Use gender age education residence employment family_status household_income i.country i.Year, robust
est store m2

reg Democratic_Priority Family_Values Social_Values Political_Values Country_Economic_Evaluation Family_Economic_Evaluation Social_Capital Political_Interest Political_Efficiency Election_Participation Internet_Use gender age education residence employment family_status household_income i.country i.Year, robust
est store m3

reg Democratic_Necessity Understanding_of_Democracy Family_Values Social_Values Political_Values Country_Economic_Evaluation Family_Economic_Evaluation Social_Capital Political_Interest Political_Efficiency Election_Participation Internet_Use gender age education residence employment family_status household_income i.country i.Year, robust
est store m4

reg Democratic_Necessity Family_Values Social_Values Political_Values Country_Economic_Evaluation Family_Economic_Evaluation Social_Capital Political_Interest Political_Efficiency Election_Participation Internet_Use gender age education residence employment family_status household_income i.country i.Year, robust
est store m5

esttab m2 m3 m4 m5 using "Results/Tables/Table 3 Regression Results of Outcome and Baseline Models.rtf", title("Table 3 Regression Results of Outcome and Baseline Models") se mtitle(Outcome_Model_1 Baseline_Model1 Outcome_Model_2 Baseline_Model2) keep(Family_Values Social_Values Political_Values Understanding_of_Democracy _cons) replace b(%12.3f) t(%12.2f) scalars (country Year N r2_a) star(* 0.1 ** 0.05 *** 0.01) nogap compress nonotes note("Note: Models (1) and (2) use Democratic Priority as the dependent variable, while Models (3) and (4) use Democratic Necessity as the dependent variable. Columns 2 and 4 include only the core independent variables, and columns 1 and 3 add the mediating variable. All models include country and year fixed effects. The estimator is OLS with fixed effects. The unit of analysis is the individual. Robust standard errors in parentheses. *p < 0.1, **p < 0.05, ***p < 0.01.") 